package top.stmo.stmoBlog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.stmo.stmoBlog.dao.mapper.NavigationMapper;
import top.stmo.stmoBlog.dao.pojo.Navigation;
import top.stmo.stmoBlog.service.AboutService;
import top.stmo.stmoBlog.service.NavigationService;

import java.util.List;

@Service
public class NavigationServiceImpl implements NavigationService {

    @Autowired
    private NavigationMapper navigationMapper;

    @Autowired
    private AboutService aboutService;

    @Override
    public List<Navigation> findAllNavigation() {
        LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper();
        List<Navigation> navigationList = navigationMapper.selectList(queryWrapper);
        return navigationList;
    }

    @Override
    public String findBookHtml() {
        String bookHtml = aboutService.findBook();
        return bookHtml;
    }
}
